﻿using System;

namespace Narwhunderful.Aphelia.Framework.IO.Serialization
{
    public sealed class PropertyTypeInfo<TProperty> where TProperty : Property
    {

        public PropertyTypeInfo(TProperty property, Type valueType)
        {
            Property = property;
            ExpectedPropertyType = valueType;
            ValueType = property.Type;
            Name = property.Name;
        }

        public PropertyTypeInfo(TProperty property, Type expectedPropertyType, Type valueType)
        {
            Property = property;
            ExpectedPropertyType = expectedPropertyType;
            ValueType = valueType;
            Name = property.Name;
        }

        public Type ExpectedPropertyType { get; set; }
        public Type ValueType { get; set; }
        public string Name { get; set; }
        public TProperty Property { get; set; }

    }

}
